﻿@model ValidationWebSite.Models.Person
@{
    object areaObject;
    ViewContext.ActionDescriptor.RouteValueDefaults.TryGetValue("area", out areaObject);
    var areaName = (areaObject as string) ?? "root";

    ViewBag.Title = "Details in " + areaName + " area.";
}

<h2>@ViewBag.Title</h2>
<div>
    <h4>Person</h4>
    <hr />

    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Id)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Id)
        </dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.UserId1)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserId1)
        </dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.UserId2)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserId2)
        </dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.UserId3)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserId3)
        </dd>
    </dl>

    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.UserId4)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserId4)
        </dd>
    </dl>
</div>

<p>
    @Html.ActionLink("Create a new one", "Create") |
    @if (string.Equals("Aria", areaName, StringComparison.OrdinalIgnoreCase))
    {
        @Html.RouteLink("Go back to home", "Home")
    }
    else
    {
        @Html.RouteLink("Go to Aria home", "AriaHome")
    }
</p>